package com.lemo.ca.exception;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobalException {

	@ExceptionHandler(value = Exception.class)
	public void defaultErrorHandler(HttpServletRequest req, Exception e) {
		System.err.println("全局异常处");
		System.err.println("getRequestURI():" + req.getRequestURI());
		System.err.println("getScheme():" + req.getScheme());
		System.err.println("getServerName():" + req.getServerName());
		System.err.println("getServerPort():" + req.getServerPort());
		System.err.println("getContextPath():" + req.getContextPath());
		System.err.println("getAuthType():" + req.getAuthType());
		System.err.println("getCharacterEncoding():" + req.getCharacterEncoding());
		System.err.println("getContentType():" + req.getContentType());
		System.err.println("getPathInfo():" + req.getPathInfo());
		System.err.println("getProtocol():" + req.getProtocol());
		System.err.println("getRequestedSessionId():" + req.getRequestedSessionId());
		System.err.println("getAsyncContext():" + req.getAsyncContext());
	}
}

